home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_cvs.idb / usr / freeware / info / cvs.info-2.z / cvs.info-2
Encoding:
GNU Info File  |  1999-04-16  |  48.9 KB  |  1,151 lines

  1. This is Info file cvs.info, produced by Makeinfo version 1.67 from the
  2. input file ./cvs.texinfo.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * CVS: (cvs).          Concurrent Versions System
  6. END-INFO-DIR-ENTRY
  7.  
  8.    Copyright (C) 1992, 1993 Signum Support AB Copyright (C) 1993, 1994
  9. Free Software Foundation, Inc.
  10.  
  11.    Permission is granted to make and distribute verbatim copies of this
  12. manual provided the copyright notice and this permission notice are
  13. preserved on all copies.
  14.  
  15.    Permission is granted to copy and distribute modified versions of
  16. this manual under the conditions for verbatim copying, provided also
  17. that the entire resulting derived work is distributed under the terms
  18. of a permission notice identical to this one.
  19.  
  20.    Permission is granted to copy and distribute translations of this
  21. manual into another language, under the above conditions for modified
  22. versions, except that this permission notice may be stated in a
  23. translation approved by the Free Software Foundation.
  24.  
  25. 
  26. File: cvs.info,  Node: Backing up,  Next: Moving a repository,  Prev: Creating a repository,  Up: Repository
  27.  
  28. Backing up a repository
  29. =======================
  30.  
  31.    There is nothing particularly magical about the files in the
  32. repository; for the most part it is possible to back them up just like
  33. any other files.  However, there are a few issues to consider.
  34.  
  35.    The first is that to be paranoid, one should either not use CVS
  36. during the backup, or have the backup program lock CVS while doing the
  37. backup.  To not use CVS, you might forbid logins to machines which can
  38. access the repository, turn off your CVS server, or similar mechanisms.
  39. The details would depend on your operating system and how you have CVS
  40. set up.  To lock CVS, you would create `#cvs.rfl' locks in each
  41. repository directory.  See *Note Concurrency::, for more on CVS locks.
  42. Having said all this, if you just back up without any of these
  43. precautions, the results are unlikely to be particularly dire.
  44. Restoring from backup, the repository might be in an inconsistent
  45. state, but this would not be particularly hard to fix manually.
  46.  
  47.    When you restore a repository from backup, assuming that changes in
  48. the repository were made after the time of the backup, working
  49. directories which were not affected by the failure may refer to
  50. revisions which no longer exist in the repository.  Trying to run CVS
  51. in such directories will typically produce an error message.  One way
  52. to get those changes back into the repository is as follows:
  53.  
  54.    * Get a new working directory.
  55.  
  56.    * Copy the files from the working directory from before the failure
  57.      over to the new working directory (do not copy the contents of the
  58.      `CVS' directories, of course).
  59.  
  60.    * Working in the new working directory, use commands such as `cvs
  61.      update' and `cvs diff' to figure out what has changed, and then
  62.      when you are ready, commit the changes into the repository.
  63.  
  64. 
  65. File: cvs.info,  Node: Moving a repository,  Next: Remote repositories,  Prev: Backing up,  Up: Repository
  66.  
  67. Moving a repository
  68. ===================
  69.  
  70.    Just as backing up the files in the repository is pretty much like
  71. backing up any other files, if you need to move a repository from one
  72. place to another it is also pretty much like just moving any other
  73. collection of files.
  74.  
  75.    The main thing to consider is that working directories point to the
  76. repository.  The simplest way to deal with a moved repository is to
  77. just get a fresh working directory after the move.  Of course, you'll
  78. want to make sure that the old working directory had been checked in
  79. before the move, or you figured out some other way to make sure that
  80. you don't lose any changes.  If you really do want to reuse the existing
  81. working directory, it should be possible with manual surgery on the
  82. `CVS/Repository' files.  You can see *Note Working directory storage::,
  83. for information on the `CVS/Repository' and `CVS/Root' files, but
  84. unless you are sure you want to bother, it probably isn't worth it.
  85.  
  86. 
  87. File: cvs.info,  Node: Remote repositories,  Next: Read-only access,  Prev: Moving a repository,  Up: Repository
  88.  
  89. Remote repositories
  90. ===================
  91.  
  92.    Your working copy of the sources can be on a different machine than
  93. the repository.  Using CVS in this manner is known as "client/server"
  94. operation.  You run CVS on a machine which can mount your working
  95. directory, known as the "client", and tell it to communicate to a
  96. machine which can mount the repository, known as the "server".
  97. Generally, using a remote repository is just like using a local one,
  98. except that the format of the repository name is:
  99.  
  100.      :METHOD:USER@HOSTNAME:/path/to/repository
  101.  
  102.    The details of exactly what needs to be set up depend on how you are
  103. connecting to the server.
  104.  
  105.    If METHOD is not specified, and the repository name contains `:',
  106. then the default is `ext' or `server', depending on your platform; both
  107. are described in *Note Connecting via rsh::.
  108.  
  109. * Menu:
  110.  
  111. * Server requirements::         Memory and other resources for servers
  112. * Connecting via rsh::          Using the `rsh' program to connect
  113. * Password authenticated::      Direct connections using passwords
  114. * GSSAPI authenticated::        Direct connections using GSSAPI
  115. * Kerberos authenticated::      Direct connections with kerberos
  116.  
  117. 
  118. File: cvs.info,  Node: Server requirements,  Next: Connecting via rsh,  Up: Remote repositories
  119.  
  120. Server requirements
  121. -------------------
  122.  
  123.    The quick answer to what sort of machine is suitable as a server is
  124. that requirements are modest--a server with 32M of memory or even less
  125. can handle a fairly large source tree with a fair amount of activity.
  126.  
  127.    The real answer, of course, is more complicated.  Estimating the
  128. known areas of large memory consumption should be sufficient to
  129. estimate memory requirements.  There are two such areas documented
  130. here; other memory consumption should be small by comparison (if you
  131. find that is not the case, let us know, as described in *Note BUGS::,
  132. so we can update this documentation).
  133.  
  134.    The first area of big memory consumption is large checkouts, when
  135. using the CVS server.  The server consists of two processes for each
  136. client that it is serving.  Memory consumption on the child process
  137. should remain fairly small.  Memory consumption on the parent process,
  138. particularly if the network connection to the client is slow, can be
  139. expected to grow to slightly more than the size of the sources in a
  140. single directory, or two megabytes, whichever is larger.
  141.  
  142.    Multiplying the size of each CVS server by the number of servers
  143. which you expect to have active at one time should give an idea of
  144. memory requirements for the server.  For the most part, the memory
  145. consumed by the parent process probably can be swap space rather than
  146. physical memory.
  147.  
  148.    The second area of large memory consumption is `diff', when checking
  149. in large files.  This is required even for binary files.  The rule of
  150. thumb is to allow about ten times the size of the largest file you will
  151. want to check in, although five times may be adequate.  For example, if
  152. you want to check in a file which is 10 megabytes, you should have 100
  153. megabytes of memory on the machine doing the checkin (the server
  154. machine for client/server, or the machine running CVS for
  155. non-client/server).  This can be swap space rather than physical
  156. memory.  Because the memory is only required briefly, there is no
  157. particular need to allow memory for more than one such checkin at a
  158. time.
  159.  
  160.    Resource consumption for the client is even more modest--any machine
  161. with enough capacity to run the operating system in question should
  162. have little trouble.
  163.  
  164.    For information on disk space requirements, see *Note Creating a
  165. repository::.
  166.  
  167. 
  168. File: cvs.info,  Node: Connecting via rsh,  Next: Password authenticated,  Prev: Server requirements,  Up: Remote repositories
  169.  
  170. Connecting with rsh
  171. -------------------
  172.  
  173.    CVS uses the `rsh' protocol to perform these operations, so the
  174. remote user host needs to have a `.rhosts' file which grants access to
  175. the local user.
  176.  
  177.    For example, suppose you are the user `mozart' on the local machine
  178. `toe.grunge.com', and the server machine is `chainsaw.yard.com'.  On
  179. chainsaw, put the following line into the file `.rhosts' in `bach''s
  180. home directory:
  181.  
  182.      toe.grunge.com  mozart
  183.  
  184.    Then test that `rsh' is working with
  185.  
  186.      rsh -l bach chainsaw.yard.com 'echo $PATH'
  187.  
  188.    Next you have to make sure that `rsh' will be able to find the
  189. server.  Make sure that the path which `rsh' printed in the above
  190. example includes the directory containing a program named `cvs' which
  191. is the server.  You need to set the path in `.bashrc', `.cshrc', etc.,
  192. not `.login' or `.profile'.  Alternately, you can set the environment
  193. variable `CVS_SERVER' on the client machine to the filename of the
  194. server you want to use, for example `/usr/local/bin/cvs-1.6'.
  195.  
  196.    There is no need to edit `inetd.conf' or start a CVS server daemon.
  197.  
  198.    There are two access methods that you use in CVSROOT for rsh.
  199. `:server:' specifies an internal rsh client, which is supported only by
  200. some CVS ports.  `:ext:' specifies an external rsh program.  By default
  201. this is `rsh' but you may set the `CVS_RSH' environment variable to
  202. invoke another program which can access the remote server (for example,
  203. `remsh' on HP-UX 9 because `rsh' is something different).  It must be a
  204. program which can transmit data to and from the server without modifying
  205. it; for example the Windows NT `rsh' is not suitable since it by
  206. default translates between CRLF and LF.  The OS/2 CVS port has a hack
  207. to pass `-b' to `rsh' to get around this, but since this could
  208. potentially cause problems for programs other than the standard `rsh',
  209. it may change in the future.  If you set `CVS_RSH' to `SSH' or some
  210. other rsh replacement, the instructions in the rest of this section
  211. concerning `.rhosts' and so on are likely to be inapplicable; consult
  212. the documentation for your rsh replacement.
  213.  
  214.    Continuing our example, supposing you want to access the module
  215. `foo' in the repository `/usr/local/cvsroot/', on machine
  216. `chainsaw.yard.com', you are ready to go:
  217.  
  218.      cvs -d :ext:bach@chainsaw.yard.com:/usr/local/cvsroot checkout foo
  219.  
  220.    (The `bach@' can be omitted if the username is the same on both the
  221. local and remote hosts.)
  222.  
  223. 
  224. File: cvs.info,  Node: Password authenticated,  Next: GSSAPI authenticated,  Prev: Connecting via rsh,  Up: Remote repositories
  225.  
  226. Direct connection with password authentication
  227. ----------------------------------------------
  228.  
  229.    The CVS client can also connect to the server using a password
  230. protocol.  This is particularly useful if using `rsh' is not feasible
  231. (for example, the server is behind a firewall), and Kerberos also is
  232. not available.
  233.  
  234.    To use this method, it is necessary to make some adjustments on both
  235. the server and client sides.
  236.  
  237. * Menu:
  238.  
  239. * Password authentication server::     Setting up the server
  240. * Password authentication client::     Using the client
  241. * Password authentication security::   What this method does and does not do
  242.  
  243. 
  244. File: cvs.info,  Node: Password authentication server,  Next: Password authentication client,  Up: Password authenticated
  245.  
  246. Setting up the server for password authentication
  247. .................................................
  248.  
  249.    First of all, you probably want to tighten the permissions on the
  250. `$CVSROOT' and `$CVSROOT/CVSROOT' directories.  See *Note Password
  251. authentication security::, for more details.
  252.  
  253.    On the server side, the file `/etc/inetd.conf' needs to be edited so
  254. `inetd' knows to run the command `cvs pserver' when it receives a
  255. connection on the right port.  By default, the port number is 2401; it
  256. would be different if your client were compiled with `CVS_AUTH_PORT'
  257. defined to something else, though.
  258.  
  259.    If your `inetd' allows raw port numbers in `/etc/inetd.conf', then
  260. the following (all on a single line in `inetd.conf') should be
  261. sufficient:
  262.  
  263.      2401  stream  tcp  nowait  root  /usr/local/bin/cvs
  264.      cvs --allow-root=/usr/cvsroot pserver
  265.  
  266.    You could also use the `-T' option to specify a temporary directory.
  267.  
  268.    The `--allow-root' option specifies the allowable CVSROOT directory.
  269. Clients which attempt to use a different CVSROOT directory will not be
  270. allowed to connect.  If there is more than one CVSROOT directory which
  271. you want to allow, repeat the option.
  272.  
  273.    If your `inetd' wants a symbolic service name instead of a raw port
  274. number, then put this in `/etc/services':
  275.  
  276.      cvspserver      2401/tcp
  277.  
  278.    and put `cvspserver' instead of `2401' in `inetd.conf'.
  279.  
  280.    Once the above is taken care of, restart your `inetd', or do
  281. whatever is necessary to force it to reread its initialization files.
  282.  
  283.    Because the client stores and transmits passwords in cleartext
  284. (almost--see *Note Password authentication security::, for details), a
  285. separate CVS password file may be used, so people don't compromise their
  286. regular passwords when they access the repository.  This file is
  287. `$CVSROOT/CVSROOT/passwd' (*note Intro administrative files::.).  Its
  288. format is similar to `/etc/passwd', except that it only has two or
  289. three fields, username, password, and optional username for the server
  290. to use.  For example:
  291.  
  292.      bach:ULtgRLXo7NRxs
  293.      cwang:1sOp854gDF3DY
  294.  
  295.    The password is encrypted according to the standard Unix `crypt()'
  296. function, so it is possible to paste in passwords directly from regular
  297. Unix `passwd' files.
  298.  
  299.    When authenticating a password, the server first checks for the user
  300. in the CVS `passwd' file.  If it finds the user, it compares against
  301. that password.  If it does not find the user, or if the CVS `passwd'
  302. file does not exist, then the server tries to match the password using
  303. the system's user-lookup routine (using the system's user-lookup
  304. routine can be disabled by setting `SystemAuth=no' in the config file,
  305. *note config::.).  When using the CVS `passwd' file, the server runs as
  306. the username specified in the third argument in the entry, or as the
  307. first argument if there is no third argument (in this way CVS allows
  308. imaginary usernames provided the CVS `passwd' file indicates
  309. corresponding valid system usernames).  In any case, CVS will have no
  310. privileges which the (valid) user would not have.
  311.  
  312.    It is possible to "map" cvs-specific usernames onto system usernames
  313. (i.e., onto system login names) in the `$CVSROOT/CVSROOT/passwd' file
  314. by appending a colon and the system username after the password.  For
  315. example:
  316.  
  317.      cvs:ULtgRLXo7NRxs:kfogel
  318.      generic:1sOp854gDF3DY:spwang
  319.      anyone:1sOp854gDF3DY:spwang
  320.  
  321.    Thus, someone remotely accessing the repository on
  322. `chainsaw.yard.com' with the following command:
  323.  
  324.      cvs -d :pserver:cvs@chainsaw.yard.com:/usr/local/cvsroot checkout foo
  325.  
  326.    would end up running the server under the system identity kfogel,
  327. assuming successful authentication.  However, the remote user would not
  328. necessarily need to know kfogel's system password, as the
  329. `$CVSROOT/CVSROOT/passwd' file might contain a different password, used
  330. only for CVS.  And as the example above indicates, it is permissible to
  331. map multiple cvs usernames onto a single system username.
  332.  
  333.    This feature is designed to allow people repository access without
  334. full system access (in particular, see *Note Read-only access::);
  335. however, also see *Note Password authentication security::.  Any sort of
  336. repository access very likely implies a degree of general system access
  337. as well.
  338.  
  339.    Right now, the only way to put a password in the CVS `passwd' file
  340. is to paste it there from somewhere else.  Someday, there may be a `cvs
  341. passwd' command.
  342.  
  343. 
  344. File: cvs.info,  Node: Password authentication client,  Next: Password authentication security,  Prev: Password authentication server,  Up: Password authenticated
  345.  
  346. Using the client with password authentication
  347. .............................................
  348.  
  349.    Before connecting to the server, the client must "log in" with the
  350. command `cvs login'.  Logging in verifies a password with the server,
  351. and also records the password for later transactions with the server.
  352. The `cvs login' command needs to know the username, server hostname,
  353. and full repository path, and it gets this information from the
  354. repository argument or the `CVSROOT' environment variable.
  355.  
  356.    `cvs login' is interactive -- it prompts for a password:
  357.  
  358.      cvs -d :pserver:bach@chainsaw.yard.com:/usr/local/cvsroot login
  359.      CVS password:
  360.  
  361.    The password is checked with the server; if it is correct, the
  362. `login' succeeds, else it fails, complaining that the password was
  363. incorrect.
  364.  
  365.    Once you have logged in, you can force CVS to connect directly to
  366. the server and authenticate with the stored password:
  367.  
  368.      cvs -d :pserver:bach@chainsaw.yard.com:/usr/local/cvsroot checkout foo
  369.  
  370.    The `:pserver:' is necessary because without it, CVS will assume it
  371. should use `rsh' to connect with the server (*note Connecting via
  372. rsh::.).  (Once you have a working copy checked out and are running CVS
  373. commands from within it, there is no longer any need to specify the
  374. repository explicitly, because CVS records it in the working copy's
  375. `CVS' subdirectory.)
  376.  
  377.    Passwords are stored by default in the file `$HOME/.cvspass'.  Its
  378. format is human-readable, but don't edit it unless you know what you
  379. are doing.  The passwords are not stored in cleartext, but are
  380. trivially encoded to protect them from "innocent" compromise (i.e.,
  381. inadvertently being seen by a system administrator who happens to look
  382. at that file).
  383.  
  384.    The password for the currently choosen remote repository can be
  385. removed from the CVS_PASSFILE by using the `cvs logout' command.
  386.  
  387.    The `CVS_PASSFILE' environment variable overrides this default.  If
  388. you use this variable, make sure you set it *before* `cvs login' is
  389. run.  If you were to set it after running `cvs login', then later CVS
  390. commands would be unable to look up the password for transmission to
  391. the server.
  392.  
  393. 
  394. File: cvs.info,  Node: Password authentication security,  Prev: Password authentication client,  Up: Password authenticated
  395.  
  396. Security considerations with password authentication
  397. ....................................................
  398.  
  399.    The passwords are stored on the client side in a trivial encoding of
  400. the cleartext, and transmitted in the same encoding.  The encoding is
  401. done only to prevent inadvertent password compromises (i.e., a system
  402. administrator accidentally looking at the file), and will not prevent
  403. even a naive attacker from gaining the password.
  404.  
  405.    The separate CVS password file (*note Password authentication
  406. server::.) allows people to use a different password for repository
  407. access than for login access.  On the other hand, once a user has
  408. non-read-only access to the repository, she can execute programs on the
  409. server system through a variety of means.  Thus, repository access
  410. implies fairly broad system access as well.  It might be possible to
  411. modify CVS to prevent that, but no one has done so as of this writing.
  412. Furthermore, there may be other ways in which having access to CVS
  413. allows people to gain more general access to the system; no one has
  414. done a careful audit.
  415.  
  416.    Note that because the `$CVSROOT/CVSROOT' directory contains `passwd'
  417. and other files which are used to check security, you must control the
  418. permissions on this directory as tightly as the permissions on `/etc'.
  419. The same applies to the `$CVSROOT' directory itself and any directory
  420. above it in the tree.  Anyone who has write access to such a directory
  421. will have the ability to become any user on the system.  Note that
  422. these permissions are typically tighter than you would use if you are
  423. not using pserver.
  424.  
  425.    In summary, anyone who gets the password gets repository access, and
  426. some measure of general system access as well.  The password is
  427. available to anyone who can sniff network packets or read a protected
  428. (i.e., user read-only) file.  If you want real security, get Kerberos.
  429.  
  430. 
  431. File: cvs.info,  Node: GSSAPI authenticated,  Next: Kerberos authenticated,  Prev: Password authenticated,  Up: Remote repositories
  432.  
  433. Direct connection with GSSAPI
  434. -----------------------------
  435.  
  436.    GSSAPI is a generic interface to network security systems such as
  437. Kerberos 5.  If you have a working GSSAPI library, you can have CVS
  438. connect via a direct TCP connection, authenticating with GSSAPI.
  439.  
  440.    To do this, CVS needs to be compiled with GSSAPI support; when
  441. configuring CVS it tries to detect whether GSSAPI libraries using
  442. kerberos version 5 are present.  You can also use the `--with-gssapi'
  443. flag to configure.
  444.  
  445.    The connection is authenticated using GSSAPI, but the message stream
  446. is *not* authenticated by default.  You must use the `-a' global option
  447. to request stream authentication.
  448.  
  449.    The data transmitted is *not* encrypted by default.  Encryption
  450. support must be compiled into both the client and the server; use the
  451. `--enable-encrypt' configure option to turn it on.  You must then use
  452. the `-x' global option to request encryption.
  453.  
  454.    GSSAPI connections are handled on the server side by the same server
  455. which handles the password authentication server; see *Note Password
  456. authentication server::.  If you are using a GSSAPI mechanism such as
  457. Kerberos which provides for strong authentication, you will probably
  458. want to disable the ability to authenticate via cleartext passwords.
  459. To do so, create an empty `CVSROOT/passwd' password file, and set
  460. `SystemAuth=no' in the config file (*note config::.).
  461.  
  462.    The GSSAPI server uses a principal name of cvs/HOSTNAME, where
  463. HOSTNAME is the canonical name of the server host.  You will have to
  464. set this up as required by your GSSAPI mechanism.
  465.  
  466.    To connect using GSSAPI, use `:gserver:'.  For example,
  467.  
  468.      cvs -d :gserver:chainsaw.yard.com:/usr/local/cvsroot checkout foo
  469.  
  470. 
  471. File: cvs.info,  Node: Kerberos authenticated,  Prev: GSSAPI authenticated,  Up: Remote repositories
  472.  
  473. Direct connection with kerberos
  474. -------------------------------
  475.  
  476.    The easiest way to use kerberos is to use the kerberos `rsh', as
  477. described in *Note Connecting via rsh::.  The main disadvantage of
  478. using rsh is that all the data needs to pass through additional
  479. programs, so it may be slower.  So if you have kerberos installed you
  480. can connect via a direct TCP connection, authenticating with kerberos.
  481.  
  482.    This section concerns the kerberos network security system, version
  483. 4.  Kerberos version 5 is supported via the GSSAPI generic network
  484. security interface, as described in the previous section.
  485.  
  486.    To do this, CVS needs to be compiled with kerberos support; when
  487. configuring CVS it tries to detect whether kerberos is present or you
  488. can use the `--with-krb4' flag to configure.
  489.  
  490.    The data transmitted is *not* encrypted by default.  Encryption
  491. support must be compiled into both the client and server; use the
  492. `--enable-encryption' configure option to turn it on.  You must then
  493. use the `-x' global option to request encryption.
  494.  
  495.    You need to edit `inetd.conf' on the server machine to run `cvs
  496. kserver'.  The client uses port 1999 by default; if you want to use
  497. another port specify it in the `CVS_CLIENT_PORT' environment variable
  498. on the client.
  499.  
  500.    When you want to use CVS, get a ticket in the usual way (generally
  501. `kinit'); it must be a ticket which allows you to log into the server
  502. machine.  Then you are ready to go:
  503.  
  504.      cvs -d :kserver:chainsaw.yard.com:/usr/local/cvsroot checkout foo
  505.  
  506.    Previous versions of CVS would fall back to a connection via rsh;
  507. this version will not do so.
  508.  
  509. 
  510. File: cvs.info,  Node: Read-only access,  Next: Server temporary directory,  Prev: Remote repositories,  Up: Repository
  511.  
  512. Read-only repository access
  513. ===========================
  514.  
  515.    It is possible to grant read-only repository access to people using
  516. the password-authenticated server (*note Password authenticated::.).
  517. (The other access methods do not have explicit support for read-only
  518. users because those methods all assume login access to the repository
  519. machine anyway, and therefore the user can do whatever local file
  520. permissions allow her to do.)
  521.  
  522.    A user who has read-only access can do only those CVS operations
  523. which do not modify the repository, except for certain "administrative"
  524. files (such as lock files and the history file).  It may be desirable
  525. to use this feature in conjunction with user-aliasing (*note Password
  526. authentication server::.).
  527.  
  528.    Unlike with previous versions of CVS, read-only users should be able
  529. merely to read the repository, and not to execute programs on the
  530. server or otherwise gain unexpected levels of access.  Or to be more
  531. accurate, the *known* holes have been plugged.  Because this feature is
  532. new and has not received a comprehensive security audit, you should use
  533. whatever level of caution seems warranted given your attitude concerning
  534. security.
  535.  
  536.    There are two ways to specify read-only access for a user: by
  537. inclusion, and by exclusion.
  538.  
  539.    "Inclusion" means listing that user specifically in the
  540. `$CVSROOT/CVSROOT/readers' file, which is simply a newline-separated
  541. list of users.  Here is a sample `readers' file:
  542.  
  543.      melissa
  544.      splotnik
  545.      jrandom
  546.  
  547.    (Don't forget the newline after the last user.)
  548.  
  549.    "Exclusion" means explicitly listing everyone who has *write*
  550. access--if the file
  551.  
  552.      $CVSROOT/CVSROOT/writers
  553.  
  554. exists, then only those users listed in it have write access, and
  555. everyone else has read-only access (of course, even the read-only users
  556. still need to be listed in the CVS `passwd' file).  The `writers' file
  557. has the same format as the `readers' file.
  558.  
  559.    Note: if your CVS `passwd' file maps cvs users onto system users
  560. (*note Password authentication server::.), make sure you deny or grant
  561. read-only access using the *cvs* usernames, not the system usernames.
  562. That is, the `readers' and `writers' files contain cvs usernames, which
  563. may or may not be the same as system usernames.
  564.  
  565.    Here is a complete description of the server's behavior in deciding
  566. whether to grant read-only or read-write access:
  567.  
  568.    If `readers' exists, and this user is listed in it, then she gets
  569. read-only access.  Or if `writers' exists, and this user is NOT listed
  570. in it, then she also gets read-only access (this is true even if
  571. `readers' exists but she is not listed there).  Otherwise, she gets
  572. full read-write access.
  573.  
  574.    Of course there is a conflict if the user is listed in both files.
  575. This is resolved in the more conservative way, it being better to
  576. protect the repository too much than too little: such a user gets
  577. read-only access.
  578.  
  579. 
  580. File: cvs.info,  Node: Server temporary directory,  Prev: Read-only access,  Up: Repository
  581.  
  582. Temporary directories for the server
  583. ====================================
  584.  
  585.    While running, the CVS server creates temporary directories.  They
  586. are named
  587.  
  588.      cvs-servPID
  589.  
  590. where PID is the process identification number of the server.  They are
  591. located in the directory specified by the `TMPDIR' environment variable
  592. (*note Environment variables::.), the `-T' global option (*note Global
  593. options::.), or failing that `/tmp'.
  594.  
  595.    In most cases the server will remove the temporary directory when it
  596. is done, whether it finishes normally or abnormally.  However, there
  597. are a few cases in which the server does not or cannot remove the
  598. temporary directory, for example:
  599.  
  600.    * If the server aborts due to an internal server error, it may
  601.      preserve the directory to aid in debugging
  602.  
  603.    * If the server is killed in a way that it has no way of cleaning up
  604.      (most notably, `kill -KILL' on unix).
  605.  
  606.    * If the system shuts down without an orderly shutdown, which tells
  607.      the server to clean up.
  608.  
  609.    In cases such as this, you will need to manually remove the
  610. `cvs-servPID' directories.  As long as there is no server running with
  611. process identification number PID, it is safe to do so.
  612.  
  613. 
  614. File: cvs.info,  Node: Starting a new project,  Next: Revisions,  Prev: Repository,  Up: Top
  615.  
  616. Starting a project with CVS
  617. ***************************
  618.  
  619.    Because renaming files and moving them between directories is
  620. somewhat inconvenient, the first thing you do when you start a new
  621. project should be to think through your file organization.  It is not
  622. impossible to rename or move files, but it does increase the potential
  623. for confusion and CVS does have some quirks particularly in the area of
  624. renaming directories.  *Note Moving files::.
  625.  
  626.    What to do next depends on the situation at hand.
  627.  
  628. * Menu:
  629.  
  630. * Setting up the files::        Getting the files into the repository
  631. * Defining the module::         How to make a module of the files
  632.  
  633. 
  634. File: cvs.info,  Node: Setting up the files,  Next: Defining the module,  Up: Starting a new project
  635.  
  636. Setting up the files
  637. ====================
  638.  
  639.    The first step is to create the files inside the repository.  This
  640. can be done in a couple of different ways.
  641.  
  642. * Menu:
  643.  
  644. * From files::                  This method is useful with old projects
  645.                                 where files already exists.
  646. * From other version control systems::  Old projects where you want to
  647.                                         preserve history from another system.
  648. * From scratch::                Creating a directory tree from scratch.
  649.  
  650. 
  651. File: cvs.info,  Node: From files,  Next: From other version control systems,  Up: Setting up the files
  652.  
  653. Creating a directory tree from a number of files
  654. ------------------------------------------------
  655.  
  656.    When you begin using CVS, you will probably already have several
  657. projects that can be put under CVS control.  In these cases the easiest
  658. way is to use the `import' command.  An example is probably the easiest
  659. way to explain how to use it.  If the files you want to install in CVS
  660. reside in `WDIR', and you want them to appear in the repository as
  661. `$CVSROOT/yoyodyne/RDIR', you can do this:
  662.  
  663.      $ cd WDIR
  664.      $ cvs import -m "Imported sources" yoyodyne/RDIR yoyo start
  665.  
  666.    Unless you supply a log message with the `-m' flag, CVS starts an
  667. editor and prompts for a message.  The string `yoyo' is a "vendor tag",
  668. and `start' is a "release tag".  They may fill no purpose in this
  669. context, but since CVS requires them they must be present.  *Note
  670. Tracking sources::, for more information about them.
  671.  
  672.    You can now verify that it worked, and remove your original source
  673. directory.
  674.  
  675.      $ cd ..
  676.      $ mv DIR DIR.orig
  677.      $ cvs checkout yoyodyne/DIR       # Explanation below
  678.      $ diff -r DIR.orig yoyodyne/DIR
  679.      $ rm -r DIR.orig
  680.  
  681. Erasing the original sources is a good idea, to make sure that you do
  682. not accidentally edit them in DIR, bypassing CVS.  Of course, it would
  683. be wise to make sure that you have a backup of the sources before you
  684. remove them.
  685.  
  686.    The `checkout' command can either take a module name as argument (as
  687. it has done in all previous examples) or a path name relative to
  688. `$CVSROOT', as it did in the example above.
  689.  
  690.    It is a good idea to check that the permissions CVS sets on the
  691. directories inside `$CVSROOT' are reasonable, and that they belong to
  692. the proper groups.  *Note File permissions::.
  693.  
  694.    If some of the files you want to import are binary, you may want to
  695. use the wrappers features to specify which files are binary and which
  696. are not.  *Note Wrappers::.
  697.  
  698. 
  699. File: cvs.info,  Node: From other version control systems,  Next: From scratch,  Prev: From files,  Up: Setting up the files
  700.  
  701. Creating Files From Other Version Control Systems
  702. -------------------------------------------------
  703.  
  704.    If you have a project which you are maintaining with another version
  705. control system, such as RCS, you may wish to put the files from that
  706. project into CVS, and preserve the revision history of the files.
  707.  
  708. From RCS
  709.      If you have been using RCS, find the RCS files--usually a file
  710.      named `foo.c' will have its RCS file in `RCS/foo.c,v' (but it
  711.      could be other places; consult the RCS documentation for details).
  712.      Then create the appropriate directories in CVS if they do not
  713.      already exist.  Then copy the files into the appropriate
  714.      directories in the CVS repository (the name in the repository must
  715.      be the name of the source file with `,v' added; the files go
  716.      directly in the appopriate directory of the repository, not in an
  717.      `RCS' subdirectory).  This is one of the few times when it is a
  718.      good idea to access the CVS repository directly, rather than using
  719.      CVS commands.  Then you are ready to check out a new working
  720.      directory.
  721.  
  722.      The RCS file should not be locked when you move it into CVS; if it
  723.      is, CVS will have trouble letting you operate on it.
  724.  
  725. From another version control system
  726.      Many version control systems have the ability to export RCS files
  727.      in the standard format.  If yours does, export the RCS files and
  728.      then follow the above instructions.
  729.  
  730.      Failing that, probably your best bet is to write a script that
  731.      will check out the files one revision at a time using the command
  732.      line interface to the other system, and then check the revisions
  733.      into CVS.  The `sccs2rcs' script mentioned below may be a useful
  734.      example to follow.
  735.  
  736. From SCCS
  737.      There is a script in the `contrib' directory of the CVS source
  738.      distribution called `sccs2rcs' which converts SCCS files to RCS
  739.      files.  Note: you must run it on a machine which has both SCCS and
  740.      RCS installed, and like everything else in contrib it is
  741.      unsupported (your mileage may vary).
  742.  
  743. From PVCS
  744.      There is a script in the `contrib' directory of the CVS source
  745.      distribution called `pvcs_to_rcs' which converts PVCS archives to
  746.      RCS files.  You must run it on a machine which has both PVCS and
  747.      RCS installed, and like everything else in contrib it is
  748.      unsupported (your mileage may vary).  See the comments in the
  749.      script for details.
  750.  
  751. 
  752. File: cvs.info,  Node: From scratch,  Prev: From other version control systems,  Up: Setting up the files
  753.  
  754. Creating a directory tree from scratch
  755. --------------------------------------
  756.  
  757.    For a new project, the easiest thing to do is probably to create an
  758. empty directory structure, like this:
  759.  
  760.      $ mkdir tc
  761.      $ mkdir tc/man
  762.      $ mkdir tc/testing
  763.  
  764.    After that, you use the `import' command to create the corresponding
  765. (empty) directory structure inside the repository:
  766.  
  767.      $ cd tc
  768.      $ cvs import -m "Created directory structure" yoyodyne/DIR yoyo start
  769.  
  770.    Then, use `add' to add files (and new directories) as they appear.
  771.  
  772.    Check that the permissions CVS sets on the directories inside
  773. `$CVSROOT' are reasonable.
  774.  
  775. 
  776. File: cvs.info,  Node: Defining the module,  Prev: Setting up the files,  Up: Starting a new project
  777.  
  778. Defining the module
  779. ===================
  780.  
  781.    The next step is to define the module in the `modules' file.  This
  782. is not strictly necessary, but modules can be convenient in grouping
  783. together related files and directories.
  784.  
  785.    In simple cases these steps are sufficient to define a module.
  786.  
  787.   1. Get a working copy of the modules file.
  788.  
  789.           $ cvs checkout CVSROOT/modules
  790.           $ cd CVSROOT
  791.  
  792.   2. Edit the file and insert a line that defines the module.  *Note
  793.      Intro administrative files::, for an introduction.  *Note
  794.      modules::, for a full description of the modules file.  You can
  795.      use the following line to define the module `tc':
  796.  
  797.           tc   yoyodyne/tc
  798.  
  799.   3. Commit your changes to the modules file.
  800.  
  801.           $ cvs commit -m "Added the tc module." modules
  802.  
  803.   4. Release the modules module.
  804.  
  805.           $ cd ..
  806.           $ cvs release -d CVSROOT
  807.  
  808. 
  809. File: cvs.info,  Node: Revisions,  Next: Branching and merging,  Prev: Starting a new project,  Up: Top
  810.  
  811. Revisions
  812. *********
  813.  
  814.    For many uses of CVS, one doesn't need to worry too much about
  815. revision numbers; CVS assigns numbers such as `1.1', `1.2', and so on,
  816. and that is all one needs to know.  However, some people prefer to have
  817. more knowledge and control concerning how CVS assigns revision numbers.
  818.  
  819.    If one wants to keep track of a set of revisions involving more than
  820. one file, such as which revisions went into a particular release, one
  821. uses a "tag", which is a symbolic revision which can be assigned to a
  822. numeric revision in each file.
  823.  
  824. * Menu:
  825.  
  826. * Revision numbers::            The meaning of a revision number
  827. * Versions revisions releases::  Terminology used in this manual
  828. * Assigning revisions::         Assigning revisions
  829. * Tags::                        Tags-Symbolic revisions
  830. * Sticky tags::                 Certain tags are persistent
  831.  
  832. 
  833. File: cvs.info,  Node: Revision numbers,  Next: Versions revisions releases,  Up: Revisions
  834.  
  835. Revision numbers
  836. ================
  837.  
  838.    Each version of a file has a unique "revision number".  Revision
  839. numbers look like `1.1', `1.2', `1.3.2.2' or even `1.3.2.2.4.5'.  A
  840. revision number always has an even number of period-separated decimal
  841. integers.  By default revision 1.1 is the first revision of a file.
  842. Each successive revision is given a new number by increasing the
  843. rightmost number by one.  The following figure displays a few
  844. revisions, with newer revisions to the right.
  845.  
  846.             +-----+    +-----+    +-----+    +-----+    +-----+
  847.             ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !
  848.             +-----+    +-----+    +-----+    +-----+    +-----+
  849.  
  850.    It is also possible to end up with numbers containing more than one
  851. period, for example `1.3.2.2'.  Such revisions represent revisions on
  852. branches (*note Branching and merging::.); such revision numbers are
  853. explained in detail in *Note Branches and revisions::.
  854.  
  855. 
  856. File: cvs.info,  Node: Versions revisions releases,  Next: Assigning revisions,  Prev: Revision numbers,  Up: Revisions
  857.  
  858. Versions, revisions and releases
  859. ================================
  860.  
  861.    A file can have several versions, as described above.  Likewise, a
  862. software product can have several versions.  A software product is
  863. often given a version number such as `4.1.1'.
  864.  
  865.    Versions in the first sense are called "revisions" in this document,
  866. and versions in the second sense are called "releases".  To avoid
  867. confusion, the word "version" is almost never used in this document.
  868.  
  869. 
  870. File: cvs.info,  Node: Assigning revisions,  Next: Tags,  Prev: Versions revisions releases,  Up: Revisions
  871.  
  872. Assigning revisions
  873. ===================
  874.  
  875.    By default, CVS will assign numeric revisions by leaving the first
  876. number the same and incrementing the second number.  For example,
  877. `1.1', `1.2', `1.3', etc.
  878.  
  879.    When adding a new file, the second number will always be one and the
  880. first number will equal the highest first number of any file in that
  881. directory.  For example, the current directory contains files whose
  882. highest numbered revisions are `1.7', `3.1', and `4.12', then an added
  883. file will be given the numeric revision `4.1'.
  884.  
  885.    Normally there is no reason to care about the revision numbers--it
  886. is easier to treat them as internal numbers that CVS maintains, and tags
  887. provide a better way to distinguish between things like release 1
  888. versus release 2 of your product (*note Tags::.).  However, if you want
  889. to set the numeric revisions, the `-r' option to `cvs commit' can do
  890. that.  The `-r' option implies the `-f' option, in the sense that it
  891. causes the files to be committed even if they are not modified.
  892.  
  893.    For example, to bring all your files up to revision 3.0 (including
  894. those that haven't changed), you might invoke:
  895.  
  896.      $ cvs commit -r 3.0
  897.  
  898.    Note that the number you specify with `-r' must be larger than any
  899. existing revision number.  That is, if revision 3.0 exists, you cannot
  900. `cvs commit -r 1.3'.  If you want to maintain several releases in
  901. parallel, you need to use a branch (*note Branching and merging::.).
  902.  
  903. 
  904. File: cvs.info,  Node: Tags,  Next: Sticky tags,  Prev: Assigning revisions,  Up: Revisions
  905.  
  906. Tags-Symbolic revisions
  907. =======================
  908.  
  909.    The revision numbers live a life of their own.  They need not have
  910. anything at all to do with the release numbers of your software
  911. product.  Depending on how you use CVS the revision numbers might
  912. change several times between two releases.  As an example, some of the
  913. source files that make up RCS 5.6 have the following revision numbers:
  914.  
  915.      ci.c            5.21
  916.      co.c            5.9
  917.      ident.c         5.3
  918.      rcs.c           5.12
  919.      rcsbase.h       5.11
  920.      rcsdiff.c       5.10
  921.      rcsedit.c       5.11
  922.      rcsfcmp.c       5.9
  923.      rcsgen.c        5.10
  924.      rcslex.c        5.11
  925.      rcsmap.c        5.2
  926.      rcsutil.c       5.10
  927.  
  928.    You can use the `tag' command to give a symbolic name to a certain
  929. revision of a file.  You can use the `-v' flag to the `status' command
  930. to see all tags that a file has, and which revision numbers they
  931. represent.  Tag names must start with an uppercase or lowercase letter
  932. and can contain uppercase and lowercase letters, digits, `-', and `_'.
  933. The two tag names `BASE' and `HEAD' are reserved for use by CVS.  It is
  934. expected that future names which are special to CVS will be specially
  935. named, for example by starting with `.', rather than being named
  936. analogously to `BASE' and `HEAD', to avoid conflicts with actual tag
  937. names.
  938.  
  939.    You'll want to choose some convention for naming tags, based on
  940. information such as the name of the program and the version number of
  941. the release.  For example, one might take the name of the program,
  942. immediately followed by the version number with `.' changed to `-', so
  943. that CVS 1.9 would be tagged with the name `cvs1-9'.  If you choose a
  944. consistent convention, then you won't constantly be guessing whether a
  945. tag is `cvs-1-9' or `cvs1_9' or what.  You might even want to consider
  946. enforcing your convention in the taginfo file (*note user-defined
  947. logging::.).
  948.  
  949.    The following example shows how you can add a tag to a file.  The
  950. commands must be issued inside your working copy of the module.  That
  951. is, you should issue the command in the directory where `backend.c'
  952. resides.
  953.  
  954.      $ cvs tag rel-0-4 backend.c
  955.      T backend.c
  956.      $ cvs status -v backend.c
  957.      ===================================================================
  958.      File: backend.c         Status: Up-to-date
  959.      
  960.          Version:            1.4     Tue Dec  1 14:39:01 1992
  961.          RCS Version:        1.4     /u/cvsroot/yoyodyne/tc/backend.c,v
  962.          Sticky Tag:         (none)
  963.          Sticky Date:        (none)
  964.          Sticky Options:     (none)
  965.      
  966.          Existing Tags:
  967.              rel-0-4                     (revision: 1.4)
  968.  
  969.    There is seldom reason to tag a file in isolation.  A more common
  970. use is to tag all the files that constitute a module with the same tag
  971. at strategic points in the development life-cycle, such as when a
  972. release is made.
  973.  
  974.      $ cvs tag rel-1-0 .
  975.      cvs tag: Tagging .
  976.      T Makefile
  977.      T backend.c
  978.      T driver.c
  979.      T frontend.c
  980.      T parser.c
  981.  
  982.    (When you give CVS a directory as argument, it generally applies the
  983. operation to all the files in that directory, and (recursively), to any
  984. subdirectories that it may contain.  *Note Recursive behavior::.)
  985.  
  986.    The `checkout' command has a flag, `-r', that lets you check out a
  987. certain revision of a module.  This flag makes it easy to retrieve the
  988. sources that make up release 1.0 of the module `tc' at any time in the
  989. future:
  990.  
  991.      $ cvs checkout -r rel-1-0 tc
  992.  
  993. This is useful, for instance, if someone claims that there is a bug in
  994. that release, but you cannot find the bug in the current working copy.
  995.  
  996.    You can also check out a module as it was at any given date.  *Note
  997. checkout options::.
  998.  
  999.    When you tag more than one file with the same tag you can think
  1000. about the tag as "a curve drawn through a matrix of filename vs.
  1001. revision number."  Say we have 5 files with the following revisions:
  1002.  
  1003.              file1   file2   file3   file4   file5
  1004.      
  1005.              1.1     1.1     1.1     1.1  /--1.1*      <-*-  TAG
  1006.              1.2*-   1.2     1.2    -1.2*-
  1007.              1.3  \- 1.3*-   1.3   / 1.3
  1008.              1.4          \  1.4  /  1.4
  1009.                            \-1.5*-   1.5
  1010.                              1.6
  1011.  
  1012.    At some time in the past, the `*' versions were tagged.  You can
  1013. think of the tag as a handle attached to the curve drawn through the
  1014. tagged revisions.  When you pull on the handle, you get all the tagged
  1015. revisions.  Another way to look at it is that you "sight" through a set
  1016. of revisions that is "flat" along the tagged revisions, like this:
  1017.  
  1018.              file1   file2   file3   file4   file5
  1019.      
  1020.                              1.1
  1021.                              1.2
  1022.                      1.1     1.3                       _
  1023.              1.1     1.2     1.4     1.1              /
  1024.              1.2*----1.3*----1.5*----1.2*----1.1     (--- <--- Look here
  1025.              1.3             1.6     1.3              \_
  1026.              1.4                     1.4
  1027.                                      1.5
  1028.  
  1029. 
  1030. File: cvs.info,  Node: Sticky tags,  Prev: Tags,  Up: Revisions
  1031.  
  1032. Sticky tags
  1033. ===========
  1034.  
  1035.    Sometimes a working copy's revision has extra data associated with
  1036. it, for example it might be on a branch (*note Branching and
  1037. merging::.), or restricted to versions prior to a certain date by
  1038. `checkout -D' or `update -D'.  Because this data persists - that is, it
  1039. applies to subsequent commands in the working copy - we refer to it as
  1040. "sticky".
  1041.  
  1042.    Most of the time, stickiness is an obscure aspect of CVS that you
  1043. don't need to think about.  However, even if you don't want to use the
  1044. feature, you may need to know *something* about sticky tags (for
  1045. example, how to avoid them!).
  1046.  
  1047.    You can use the `status' command to see if any sticky tags or dates
  1048. are set:
  1049.  
  1050.      $ cvs status driver.c
  1051.      ===================================================================
  1052.      File: driver.c          Status: Up-to-date
  1053.      
  1054.          Version:            1.7.2.1 Sat Dec  5 19:35:03 1992
  1055.          RCS Version:        1.7.2.1 /u/cvsroot/yoyodyne/tc/driver.c,v
  1056.          Sticky Tag:         rel-1-0-patches (branch: 1.7.2)
  1057.          Sticky Date:        (none)
  1058.          Sticky Options:     (none)
  1059.  
  1060.    The sticky tags will remain on your working files until you delete
  1061. them with `cvs update -A'.  The `-A' option retrieves the version of
  1062. the file from the head of the trunk, and forgets any sticky tags,
  1063. dates, or options.
  1064.  
  1065.    The most common use of sticky tags is to identify which branch one
  1066. is working on, as described in *Note Accessing branches::.  However,
  1067. non-branch sticky tags have uses as well.  For example, suppose that
  1068. you want to avoid updating your working directory, to isolate yourself
  1069. from possibly destabilizing changes other people are making.  You can,
  1070. of course, just refrain from running `cvs update'.  But if you want to
  1071. avoid updating only a portion of a larger tree, then sticky tags can
  1072. help.  If you check out a certain revision (such as 1.4) it will become
  1073. sticky.  Subsequent `cvs update' commands will not retrieve the latest
  1074. revision until you reset the tag with `cvs update -A'.  Likewise, use
  1075. of the `-D' option to `update' or `checkout' sets a "sticky date",
  1076. which, similarly, causes that date to be used for future retrievals.
  1077.  
  1078.    Many times you will want to retrieve an old version of a file
  1079. without setting a sticky tag.  The way to do that is with the `-p'
  1080. option to `checkout' or `update', which sends the contents of the file
  1081. to standard output.  For example, suppose you have a file named `file1'
  1082. which existed as revision 1.1, and you then removed it (thus adding a
  1083. dead revision 1.2).  Now suppose you want to add it again, with the same
  1084. contents it had previously.  Here is how to do it:
  1085.  
  1086.      $ cvs update -p -r 1.1 file1 >file1
  1087.      ===================================================================
  1088.      Checking out file1
  1089.      RCS:  /tmp/cvs-sanity/cvsroot/first-dir/Attic/file1,v
  1090.      VERS: 1.1
  1091.      ***************
  1092.      $ cvs add file1
  1093.      cvs add: re-adding file file1 (in place of dead revision 1.2)
  1094.      cvs add: use 'cvs commit' to add this file permanently
  1095.      $ cvs commit -m test
  1096.      Checking in file1;
  1097.      /tmp/cvs-sanity/cvsroot/first-dir/file1,v  <--  file1
  1098.      new revision: 1.3; previous revision: 1.2
  1099.      done
  1100.      $
  1101.  
  1102. 
  1103. File: cvs.info,  Node: Branching and merging,  Next: Recursive behavior,  Prev: Revisions,  Up: Top
  1104.  
  1105. Branching and merging
  1106. *********************
  1107.  
  1108.    CVS allows you to isolate changes onto a separate line of
  1109. development, known as a "branch".  When you change files on a branch,
  1110. those changes do not appear on the main trunk or other branches.
  1111.  
  1112.    Later you can move changes from one branch to another branch (or the
  1113. main trunk) by "merging".  Merging involves first running `cvs update
  1114. -j', to merge the changes into the working directory.  You can then
  1115. commit that revision, and thus effectively copy the changes onto
  1116. another branch.
  1117.  
  1118. * Menu:
  1119.  
  1120. * Branches motivation::         What branches are good for
  1121. * Creating a branch::           Creating a branch
  1122. * Accessing branches::          Checking out and updating branches
  1123. * Branches and revisions::      Branches are reflected in revision numbers
  1124. * Magic branch numbers::        Magic branch numbers
  1125. * Merging a branch::            Merging an entire branch
  1126. * Merging more than once::      Merging from a branch several times
  1127. * Merging two revisions::       Merging differences between two revisions
  1128. * Merging adds and removals::   What if files are added or removed?
  1129.  
  1130. 
  1131. File: cvs.info,  Node: Branches motivation,  Next: Creating a branch,  Up: Branching and merging
  1132.  
  1133. What branches are good for
  1134. ==========================
  1135.  
  1136.    Suppose that release 1.0 of tc has been made.  You are continuing to
  1137. develop tc, planning to create release 1.1 in a couple of months.
  1138. After a while your customers start to complain about a fatal bug.  You
  1139. check out release 1.0 (*note Tags::.) and find the bug (which turns out
  1140. to have a trivial fix).  However, the current revision of the sources
  1141. are in a state of flux and are not expected to be stable for at least
  1142. another month.  There is no way to make a bugfix release based on the
  1143. newest sources.
  1144.  
  1145.    The thing to do in a situation like this is to create a "branch" on
  1146. the revision trees for all the files that make up release 1.0 of tc.
  1147. You can then make modifications to the branch without disturbing the
  1148. main trunk.  When the modifications are finished you can elect to
  1149. either incorporate them on the main trunk, or leave them on the branch.
  1150.  
  1151.